﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace project
{
    public partial class CustomerSelect : Form
    {
        public CustomerSelect()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void CustomerSelect_Load(object sender, EventArgs e)
        {
            InitData();
        }
        public void InitData()
        {
            string sql = "Select * from Customer";
            DataTable dt= DBHelper.GetTable(sql);
            this.dataGridView1.DataSource = dt;
            this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        }
    }
}
